/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.kifas.ui.util;

import java.util.Locale;
import java.util.ResourceBundle;

/**
 *
 * @author dhamarsu
 */
public class UrlUtil {
    private String wsRestUrl;

    public UrlUtil() {
    }


    public UrlUtil(String key) {
        Locale[] supportedLocales = {
            Locale.FRENCH,
            Locale.GERMAN,
            Locale.ENGLISH
        };
        ResourceBundle labels =
        ResourceBundle.getBundle("application", Locale.ENGLISH);
        this.wsRestUrl = labels.getString(key);

//        Properties prop = new Properties();
//        File f = new File("../config/application.properties");
//        System.out.println(" file : " + f.getAbsolutePath());
//        try {
//            prop.load(new FileInputStream(f.getAbsoluteFile()));
//        } catch (IOException e) {
//            e.printStackTrace();
//        }
//
//        this.wsRestUrl = prop.getProperty(key);
//        this.wsRestUrl = "http://localhost:8080/kifasController";
    }



    public String getWsRestUrl() {

        return wsRestUrl;
    }

    public void setWsRestUrl(String wsRestUrl) {
        this.wsRestUrl = wsRestUrl;
    }
    
}
